package com.example.springaop.controller;

import com.example.springaop.config.MyAspect;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-12-24
 * Time: 17:29
 */
@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {
    @MyAspect
    @RequestMapping("/t1")
    public String t1(){
        return "t1";
    }
    @RequestMapping("/t2")
    public String t2(){
        return "t2";
    }



    @RequestMapping("/t3")
    private int t3(){
        return -1;
    }

    @RequestMapping("/t4")
    public String t4(){
        int a = 10 / 0;
        return "t4";
    }




}
